function computeCost()
{
	var cost = 0, maxperson = 0;
	
	var start = document.getElementById('reserve_reservationdate_from').value;
	var finish = document.getElementById('reserve_reservationdate_to').value;
	var unit = document.getElementById('unitid').value;
	
	if (start == '')
		start = 0;
	if (finish == '')
		finish = 0;
	if (unit == '')
		unit = 0;
	
	start = parseInt(start.substr(8, 2));
	finish = parseInt(finish.substr(8, 2));
							
	switch(unit)
	{
		case '1':
		//maxperson = 12;
		unit = 5000;
		break;
								
		case '2':
		//maxperson = 10;
		unit = 5000;
		break;
								
		case '3':
		//maxperson = 12;
		unit = 15000;
		break;
	}
	
	cost = (finish - start)*unit;
	if (cost < 0)
		cost = 0;

	document.getElementById('total_cost').value=cost;
}

function computeChild()
{
	var selectchild = document.getElementById('children');
	$("#children").empty();
	
	var adult = document.getElementById('adults').value;
	var seladult = adult;
	
	var optn = document.createElement("option");
		optn.text = "Select No. of Child";
		//optn.value = i;
	
		selectchild.options.add(optn);
		
	for (i=1;i<=(10-seladult);i++)
	{
		var optn = document.createElement("option");
		optn.text = i;
		optn.value = i;
	
		selectchild.options.add(optn);
	}
	
}